home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / docs / gas / as.i4 < prev    next >
Encoding:
GNU Info File  |  1994-12-17  |  49.6 KB  |  1,283 lines

  1. This is Info file as.info, produced by Makeinfo-1.55 from the input
  2. file ./as.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * As: (as).                     The GNU assembler.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This file documents the GNU Assembler "as".
  9.  
  10.    Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided that
  18. the entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions.
  24.  
  25. 
  26. File: as.info,  Node: Options-i960,  Next: Floating Point-i960,  Up: i960-Dependent
  27.  
  28. i960 Command-line Options
  29. -------------------------
  30.  
  31. `-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC'
  32.      Select the 80960 architecture.  Instructions or features not
  33.      supported by the selected architecture cause fatal errors.
  34.  
  35.      `-ACA' is equivalent to `-ACA_A'; `-AKC' is equivalent to `-AMC'.
  36.      Synonyms are provided for compatibility with other tools.
  37.  
  38.      If you do not specify any of these options, `as' generates code
  39.      for any instruction or feature that is supported by *some* version
  40.      of the 960 (even if this means mixing architectures!).  In
  41.      principle, `as' attempts to deduce the minimal sufficient
  42.      processor type if none is specified; depending on the object code
  43.      format, the processor type may be recorded in the object file.  If
  44.      it is critical that the `as' output match a specific architecture,
  45.      specify that architecture explicitly.
  46.  
  47. `-b'
  48.      Add code to collect information about conditional branches taken,
  49.      for later optimization using branch prediction bits.  (The
  50.      conditional branch instructions have branch prediction bits in the
  51.      CA, CB, and CC architectures.)  If BR represents a conditional
  52.      branch instruction, the following represents the code generated by
  53.      the assembler when `-b' is specified:
  54.  
  55.                   call    INCREMENT ROUTINE
  56.                   .word   0       # pre-counter
  57.           Label:  BR
  58.                   call    INCREMENT ROUTINE
  59.                   .word   0       # post-counter
  60.  
  61.      The counter following a branch records the number of times that
  62.      branch was *not* taken; the differenc between the two counters is
  63.      the number of times the branch *was* taken.
  64.  
  65.      A table of every such `Label' is also generated, so that the
  66.      external postprocessor `gbr960' (supplied by Intel) can locate all
  67.      the counters.  This table is always labelled `__BRANCH_TABLE__';
  68.      this is a local symbol to permit collecting statistics for many
  69.      separate object files.  The table is word aligned, and begins with
  70.      a two-word header.  The first word, initialized to 0, is used in
  71.      maintaining linked lists of branch tables.  The second word is a
  72.      count of the number of entries in the table, which follow
  73.      immediately: each is a word, pointing to one of the labels
  74.      illustrated above.
  75.  
  76.            +------------+------------+------------+ ... +------------+
  77.            |            |            |            |     |            |
  78.            |  *NEXT     |  COUNT: N  | *BRLAB 1   |     | *BRLAB N   |
  79.            |            |            |            |     |            |
  80.            +------------+------------+------------+ ... +------------+
  81.           
  82.                          __BRANCH_TABLE__ layout
  83.  
  84.      The first word of the header is used to locate multiple branch
  85.      tables, since each object file may contain one. Normally the links
  86.      are maintained with a call to an initialization routine, placed at
  87.      the beginning of each function in the file.  The GNU C compiler
  88.      generates these calls automatically when you give it a `-b' option.
  89.      For further details, see the documentation of `gbr960'.
  90.  
  91. `-no-relax'
  92.      Normally, Compare-and-Branch instructions with targets that require
  93.      displacements greater than 13 bits (or that have external targets)
  94.      are replaced with the corresponding compare (or `chkbit') and
  95.      branch instructions.  You can use the `-no-relax' option to
  96.      specify that `as' should generate errors instead, if the target
  97.      displacement is larger than 13 bits.
  98.  
  99.      This option does not affect the Compare-and-Jump instructions; the
  100.      code emitted for them is *always* adjusted when necessary
  101.      (depending on displacement size), regardless of whether you use
  102.      `-no-relax'.
  103.  
  104. 
  105. File: as.info,  Node: Floating Point-i960,  Next: Directives-i960,  Prev: Options-i960,  Up: i960-Dependent
  106.  
  107. Floating Point
  108. --------------
  109.  
  110.    `as' generates IEEE floating-point numbers for the directives
  111. `.float', `.double', `.extended', and `.single'.
  112.  
  113. 
  114. File: as.info,  Node: Directives-i960,  Next: Opcodes for i960,  Prev: Floating Point-i960,  Up: i960-Dependent
  115.  
  116. i960 Machine Directives
  117. -----------------------
  118.  
  119. `.bss SYMBOL, LENGTH, ALIGN'
  120.      Reserve LENGTH bytes in the bss section for a local SYMBOL,
  121.      aligned to the power of two specified by ALIGN.  LENGTH and ALIGN
  122.      must be positive absolute expressions.  This directive differs
  123.      from `.lcomm' only in that it permits you to specify an alignment.
  124.      *Note `.lcomm': Lcomm.
  125.  
  126. `.extended FLONUMS'
  127.      `.extended' expects zero or more flonums, separated by commas; for
  128.      each flonum, `.extended' emits an IEEE extended-format (80-bit)
  129.      floating-point number.
  130.  
  131. `.leafproc CALL-LAB, BAL-LAB'
  132.      You can use the `.leafproc' directive in conjunction with the
  133.      optimized `callj' instruction to enable faster calls of leaf
  134.      procedures.  If a procedure is known to call no other procedures,
  135.      you may define an entry point that skips procedure prolog code
  136.      (and that does not depend on system-supplied saved context), and
  137.      declare it as the BAL-LAB using `.leafproc'.  If the procedure
  138.      also has an entry point that goes through the normal prolog, you
  139.      can specify that entry point as CALL-LAB.
  140.  
  141.      A `.leafproc' declaration is meant for use in conjunction with the
  142.      optimized call instruction `callj'; the directive records the data
  143.      needed later to choose between converting the `callj' into a `bal'
  144.      or a `call'.
  145.  
  146.      CALL-LAB is optional; if only one argument is present, or if the
  147.      two arguments are identical, the single argument is assumed to be
  148.      the `bal' entry point.
  149.  
  150. `.sysproc NAME, INDEX'
  151.      The `.sysproc' directive defines a name for a system procedure.
  152.      After you define it using `.sysproc', you can use NAME to refer to
  153.      the system procedure identified by INDEX when calling procedures
  154.      with the optimized call instruction `callj'.
  155.  
  156.      Both arguments are required; INDEX must be between 0 and 31
  157.      (inclusive).
  158.  
  159. 
  160. File: as.info,  Node: Opcodes for i960,  Prev: Directives-i960,  Up: i960-Dependent
  161.  
  162. i960 Opcodes
  163. ------------
  164.  
  165.    All Intel 960 machine instructions are supported; *note i960
  166. Command-line Options: Options-i960. for a discussion of selecting the
  167. instruction subset for a particular 960 architecture.
  168.  
  169.    Some opcodes are processed beyond simply emitting a single
  170. corresponding instruction: `callj', and Compare-and-Branch or
  171. Compare-and-Jump instructions with target displacements larger than 13
  172. bits.
  173.  
  174. * Menu:
  175.  
  176. * callj-i960::                  `callj'
  177. * Compare-and-branch-i960::     Compare-and-Branch
  178.  
  179. 
  180. File: as.info,  Node: callj-i960,  Next: Compare-and-branch-i960,  Up: Opcodes for i960
  181.  
  182. `callj'
  183. .......
  184.  
  185.    You can write `callj' to have the assembler or the linker determine
  186. the most appropriate form of subroutine call: `call', `bal', or
  187. `calls'.  If the assembly source contains enough information--a
  188. `.leafproc' or `.sysproc' directive defining the operand--then `as'
  189. translates the `callj'; if not, it simply emits the `callj', leaving it
  190. for the linker to resolve.
  191.  
  192. 
  193. File: as.info,  Node: Compare-and-branch-i960,  Prev: callj-i960,  Up: Opcodes for i960
  194.  
  195. Compare-and-Branch
  196. ..................
  197.  
  198.    The 960 architectures provide combined Compare-and-Branch
  199. instructions that permit you to store the branch target in the lower 13
  200. bits of the instruction word itself.  However, if you specify a branch
  201. target far enough away that its address won't fit in 13 bits, the
  202. assembler can either issue an error, or convert your Compare-and-Branch
  203. instruction into separate instructions to do the compare and the branch.
  204.  
  205.    Whether `as' gives an error or expands the instruction depends on
  206. two choices you can make: whether you use the `-no-relax' option, and
  207. whether you use a "Compare and Branch" instruction or a "Compare and
  208. Jump" instruction.  The "Jump" instructions are *always* expanded if
  209. necessary; the "Branch" instructions are expanded when necessary
  210. *unless* you specify `-no-relax'--in which case `as' gives an error
  211. instead.
  212.  
  213.    These are the Compare-and-Branch instructions, their "Jump" variants,
  214. and the instruction pairs they may expand into:
  215.  
  216.              Compare and
  217.           Branch      Jump       Expanded to
  218.           ------    ------       ------------
  219.              bbc                 chkbit; bno
  220.              bbs                 chkbit; bo
  221.           cmpibe    cmpije       cmpi; be
  222.           cmpibg    cmpijg       cmpi; bg
  223.          cmpibge   cmpijge       cmpi; bge
  224.           cmpibl    cmpijl       cmpi; bl
  225.          cmpible   cmpijle       cmpi; ble
  226.          cmpibno   cmpijno       cmpi; bno
  227.          cmpibne   cmpijne       cmpi; bne
  228.           cmpibo    cmpijo       cmpi; bo
  229.           cmpobe    cmpoje       cmpo; be
  230.           cmpobg    cmpojg       cmpo; bg
  231.          cmpobge   cmpojge       cmpo; bge
  232.           cmpobl    cmpojl       cmpo; bl
  233.          cmpoble   cmpojle       cmpo; ble
  234.          cmpobne   cmpojne       cmpo; bne
  235.  
  236. 
  237. File: as.info,  Node: M68K-Dependent,  Next: Sparc-Dependent,  Prev: i960-Dependent,  Up: Machine Dependencies
  238.  
  239. M680x0 Dependent Features
  240. =========================
  241.  
  242. * Menu:
  243.  
  244. * M68K-Opts::                   M680x0 Options
  245. * M68K-Syntax::                 Syntax
  246. * M68K-Moto-Syntax::            Motorola Syntax
  247. * M68K-Float::                  Floating Point
  248. * M68K-Directives::             680x0 Machine Directives
  249. * M68K-opcodes::                Opcodes
  250.  
  251. 
  252. File: as.info,  Node: M68K-Opts,  Next: M68K-Syntax,  Up: M68K-Dependent
  253.  
  254. M680x0 Options
  255. --------------
  256.  
  257.    The Motorola 680x0 version of `as' has two machine dependent options.
  258. One shortens undefined references from 32 to 16 bits, while the other
  259. is used to tell `as' what kind of machine it is assembling for.
  260.  
  261.    You can use the `-l' option to shorten the size of references to
  262. undefined symbols.  If you do not use the `-l' option, references to
  263. undefined symbols are wide enough for a full `long' (32 bits).  (Since
  264. `as' cannot know where these symbols end up, `as' can only allocate
  265. space for the linker to fill in later.  Since `as' does not know how
  266. far away these symbols are, it allocates as much space as it can.)  If
  267. you use this option, the references are only one word wide (16 bits).
  268. This may be useful if you want the object file to be as small as
  269. possible, and you know that the relevant symbols are always less than
  270. 17 bits away.
  271.  
  272.    The 680x0 version of `as' is most frequently used to assemble
  273. programs for the Motorola MC68020 microprocessor.  Occasionally it is
  274. used to assemble programs for the mostly similar, but slightly different
  275. MC68000 or MC68010 microprocessors.  You can give `as' the options
  276. `-m68000', `-mc68000', `-m68010', `-mc68010', `-m68020', and `-mc68020'
  277. to tell it what processor is the target.
  278.  
  279. 
  280. File: as.info,  Node: M68K-Syntax,  Next: M68K-Moto-Syntax,  Prev: M68K-Opts,  Up: M68K-Dependent
  281.  
  282. Syntax
  283. ------
  284.  
  285.    This syntax for the Motorola 680x0 was developed at MIT.
  286.  
  287.    The 680x0 version of `as' uses syntax compatible with the Sun
  288. assembler.  Intervening periods are ignored; for example, `movl' is
  289. equivalent to `move.l'.
  290.  
  291.    In the following table "apc" stands for any of the address registers
  292. (`a0' through `a7'), nothing, (`'), the Program Counter (`pc'), or the
  293. zero-address relative to the program counter (`zpc').
  294.  
  295.    The following addressing modes are understood:
  296. "Immediate"
  297.      `#DIGITS'
  298.  
  299. "Data Register"
  300.      `d0' through `d7'
  301.  
  302. "Address Register"
  303.      `a0' through `a7'
  304.      `a7' is also known as `sp', i.e. the Stack Pointer.  `a6' is also
  305.      known as `fp', the Frame Pointer.
  306.  
  307. "Address Register Indirect"
  308.      `a0@' through `a7@'
  309.  
  310. "Address Register Postincrement"
  311.      `a0@+' through `a7@+'
  312.  
  313. "Address Register Predecrement"
  314.      `a0@-' through `a7@-'
  315.  
  316. "Indirect Plus Offset"
  317.      `APC@(DIGITS)'
  318.  
  319. "Index"
  320.      `APC@(DIGITS,REGISTER:SIZE:SCALE)'
  321.  
  322.      or `APC@(REGISTER:SIZE:SCALE)'
  323.  
  324. "Postindex"
  325.      `APC@(DIGITS)@(DIGITS,REGISTER:SIZE:SCALE)'
  326.  
  327.      or `APC@(DIGITS)@(REGISTER:SIZE:SCALE)'
  328.  
  329. "Preindex"
  330.      `APC@(DIGITS,REGISTER:SIZE:SCALE)@(DIGITS)'
  331.  
  332.      or `APC@(REGISTER:SIZE:SCALE)@(DIGITS)'
  333.  
  334. "Memory Indirect"
  335.      `APC@(DIGITS)@(DIGITS)'
  336.  
  337. "Absolute"
  338.      `SYMBOL', or `DIGITS'
  339.  
  340.    For some configurations, especially those where the compiler normally
  341. does not prepend an underscore to the names of user variables, the
  342. assembler requires a `%' before any use of a register name.  This is
  343. intended to let the assembler distinguish between user variables and
  344. registers named `a0' through `a7', and so on.  The `%' is always
  345. accepted, but is only required for some configurations, notably
  346. `m68k-coff'.
  347.  
  348. 
  349. File: as.info,  Node: M68K-Moto-Syntax,  Next: M68K-Float,  Prev: M68K-Syntax,  Up: M68K-Dependent
  350.  
  351. Motorola Syntax
  352. ---------------
  353.  
  354.    The standard Motorola syntax for this chip differs from the syntax
  355. already discussed (*note Syntax: M68K-Syntax.).  `as' can accept both
  356. kinds of syntax, even within a single instruction.  The two kinds of
  357. syntax are fully compatible.
  358.  
  359.    In particular, you may write or generate M68K assembler with the
  360. following conventions:
  361.  
  362.    (In the following table "apc" stands for any of the address
  363. registers (`a0' through `a7'), nothing, (`'), the Program Counter
  364. (`pc'), or the zero-address relative to the program counter (`zpc').)
  365.  
  366.    The following additional addressing modes are understood:
  367. "Address Register Indirect"
  368.      `a0' through `a7'
  369.      `a7' is also known as `sp', i.e. the Stack Pointer.  `a6' is also
  370.      known as `fp', the Frame Pointer.
  371.  
  372. "Address Register Postincrement"
  373.      `(a0)+' through `(a7)+'
  374.  
  375. "Address Register Predecrement"
  376.      `-(a0)' through `-(a7)'
  377.  
  378. "Indirect Plus Offset"
  379.      `DIGITS(APC)'
  380.  
  381. "Index"
  382.      `DIGITS(APC,(REGISTER.SIZE*SCALE)'
  383.      or `(APC,REGISTER.SIZE*SCALE)'
  384.      In either case, SIZE and SCALE are optional (SCALE defaults to
  385.      `1', SIZE defaults to `l').   SCALE can be `1', `2', `4', or `8'.
  386.      SIZE can be `w' or `l'.  SCALE is only supported on the 68020 and
  387.      greater.
  388.  
  389. 
  390. File: as.info,  Node: M68K-Float,  Next: M68K-Directives,  Prev: M68K-Moto-Syntax,  Up: M68K-Dependent
  391.  
  392. Floating Point
  393. --------------
  394.  
  395.    The floating point code is not too well tested, and may have subtle
  396. bugs in it.
  397.  
  398.    Packed decimal (P) format floating literals are not supported.  Feel
  399. free to add the code!
  400.  
  401.    The floating point formats generated by directives are these.
  402.  
  403. `.float'
  404.      `Single' precision floating point constants.
  405.  
  406. `.double'
  407.      `Double' precision floating point constants.
  408.  
  409.    There is no directive to produce regions of memory holding extended
  410. precision numbers, however they can be used as immediate operands to
  411. floating-point instructions.  Adding a directive to create extended
  412. precision numbers would not be hard, but it has not yet seemed
  413. necessary.
  414.  
  415. 
  416. File: as.info,  Node: M68K-Directives,  Next: M68K-opcodes,  Prev: M68K-Float,  Up: M68K-Dependent
  417.  
  418. 680x0 Machine Directives
  419. ------------------------
  420.  
  421.    In order to be compatible with the Sun assembler the 680x0 assembler
  422. understands the following directives.
  423.  
  424. `.data1'
  425.      This directive is identical to a `.data 1' directive.
  426.  
  427. `.data2'
  428.      This directive is identical to a `.data 2' directive.
  429.  
  430. `.even'
  431.      This directive is identical to a `.align 1' directive.
  432.  
  433. `.skip'
  434.      This directive is identical to a `.space' directive.
  435.  
  436. 
  437. File: as.info,  Node: M68K-opcodes,  Prev: M68K-Directives,  Up: M68K-Dependent
  438.  
  439. Opcodes
  440. -------
  441.  
  442. * Menu:
  443.  
  444. * M68K-Branch::                 Branch Improvement
  445. * M68K-Chars::                  Special Characters
  446.  
  447. 
  448. File: as.info,  Node: M68K-Branch,  Next: M68K-Chars,  Up: M68K-opcodes
  449.  
  450. Branch Improvement
  451. ..................
  452.  
  453.    Certain pseudo opcodes are permitted for branch instructions.  They
  454. expand to the shortest branch instruction that reach the target.
  455. Generally these mnemonics are made by substituting `j' for `b' at the
  456. start of a Motorola mnemonic.
  457.  
  458.    The following table summarizes the pseudo-operations.  A `*' flags
  459. cases that are more fully described after the table:
  460.  
  461.                Displacement
  462.                +-------------------------------------------------
  463.                |                68020   68000/10
  464.      Pseudo-Op |BYTE    WORD    LONG    LONG      non-PC relative
  465.                +-------------------------------------------------
  466.           jbsr |bsrs    bsr     bsrl    jsr       jsr
  467.            jra |bras    bra     bral    jmp       jmp
  468.      *     jXX |bXXs    bXX     bXXl    bNXs;jmpl bNXs;jmp
  469.      *    dbXX |dbXX    dbXX        dbXX; bra; jmpl
  470.      *    fjXX |fbXXw   fbXXw   fbXXl             fbNXw;jmp
  471.      
  472.      XX: condition
  473.      NX: negative of condition XX
  474.  
  475.                     `*'--see full description below
  476.  
  477. `jbsr'
  478. `jra'
  479.      These are the simplest jump pseudo-operations; they always map to
  480.      one particular machine instruction, depending on the displacement
  481.      to the branch target.
  482.  
  483. `jXX'
  484.      Here, `jXX' stands for an entire family of pseudo-operations,
  485.      where XX is a conditional branch or condition-code test.  The full
  486.      list of pseudo-ops in this family is:
  487.            jhi   jls   jcc   jcs   jne   jeq   jvc
  488.            jvs   jpl   jmi   jge   jlt   jgt   jle
  489.  
  490.      For the cases of non-PC relative displacements and long
  491.      displacements on the 68000 or 68010, `as' issues a longer code
  492.      fragment in terms of NX, the opposite condition to XX.  For
  493.      example, for the non-PC relative case:
  494.               jXX foo
  495.      gives
  496.                bNXs oof
  497.                jmp foo
  498.            oof:
  499.  
  500. `dbXX'
  501.      The full family of pseudo-operations covered here is
  502.            dbhi   dbls   dbcc   dbcs   dbne   dbeq   dbvc
  503.            dbvs   dbpl   dbmi   dbge   dblt   dbgt   dble
  504.            dbf    dbra   dbt
  505.  
  506.      Other than for word and byte displacements, when the source reads
  507.      `dbXX foo', `as' emits
  508.                dbXX oo1
  509.                bra oo2
  510.            oo1:jmpl foo
  511.            oo2:
  512.  
  513. `fjXX'
  514.      This family includes
  515.            fjne   fjeq   fjge   fjlt   fjgt   fjle   fjf
  516.            fjt    fjgl   fjgle  fjnge  fjngl  fjngle fjngt
  517.            fjnle  fjnlt  fjoge  fjogl  fjogt  fjole  fjolt
  518.            fjor   fjseq  fjsf   fjsne  fjst   fjueq  fjuge
  519.            fjugt  fjule  fjult  fjun
  520.  
  521.      For branch targets that are not PC relative, `as' emits
  522.                fbNX oof
  523.                jmp foo
  524.            oof:
  525.      when it encounters `fjXX foo'.
  526.  
  527. 
  528. File: as.info,  Node: M68K-Chars,  Prev: M68K-Branch,  Up: M68K-opcodes
  529.  
  530. Special Characters
  531. ..................
  532.  
  533.    The immediate character is `#' for Sun compatibility.  The
  534. line-comment character is `|'.  If a `#' appears at the beginning of a
  535. line, it is treated as a comment unless it looks like `# line file', in
  536. which case it is treated normally.
  537.  
  538. 
  539. File: as.info,  Node: Sparc-Dependent,  Next: Z8000-Dependent,  Prev: M68K-Dependent,  Up: Machine Dependencies
  540.  
  541. SPARC Dependent Features
  542. ========================
  543.  
  544. * Menu:
  545.  
  546. * Sparc-Opts::                  Options
  547. * Sparc-Float::                 Floating Point
  548. * Sparc-Directives::            Sparc Machine Directives
  549.  
  550. 
  551. File: as.info,  Node: Sparc-Opts,  Next: Sparc-Float,  Up: Sparc-Dependent
  552.  
  553. Options
  554. -------
  555.  
  556.    The SPARC chip family includes several successive levels (or other
  557. variants) of chip, using the same core instruction set, but including a
  558. few additional instructions at each level.
  559.  
  560.    By default, `as' assumes the core instruction set (SPARC v6), but
  561. "bumps" the architecture level as needed: it switches to successively
  562. higher architectures as it encounters instructions that only exist in
  563. the higher levels.
  564.  
  565. `-Av6 | -Av7 | -Av8 | -Asparclite'
  566.      Use one of the `-A' options to select one of the SPARC
  567.      architectures explicitly.  If you select an architecture
  568.      explicitly, `as' reports a fatal error if it encounters an
  569.      instruction or feature requiring a higher level.
  570.  
  571. `-bump'
  572.      Permit the assembler to "bump" the architecture level as required,
  573.      but warn whenever it is necessary to switch to another level.
  574.  
  575. 
  576. File: as.info,  Node: Sparc-Float,  Next: Sparc-Directives,  Prev: Sparc-Opts,  Up: Sparc-Dependent
  577.  
  578. Floating Point
  579. --------------
  580.  
  581.    The Sparc uses IEEE floating-point numbers.
  582.  
  583. 
  584. File: as.info,  Node: Sparc-Directives,  Prev: Sparc-Float,  Up: Sparc-Dependent
  585.  
  586. Sparc Machine Directives
  587. ------------------------
  588.  
  589.    The Sparc version of `as' supports the following additional machine
  590. directives:
  591.  
  592. `.common'
  593.      This must be followed by a symbol name, a positive number, and
  594.      `"bss"'.  This behaves somewhat like `.comm', but the syntax is
  595.      different.
  596.  
  597. `.half'
  598.      This is functionally identical to `.short'.
  599.  
  600. `.proc'
  601.      This directive is ignored.  Any text following it on the same line
  602.      is also ignored.
  603.  
  604. `.reserve'
  605.      This must be followed by a symbol name, a positive number, and
  606.      `"bss"'.  This behaves somewhat like `.lcomm', but the syntax is
  607.      different.
  608.  
  609. `.seg'
  610.      This must be followed by `"text"', `"data"', or `"data1"'.  It
  611.      behaves like `.text', `.data', or `.data 1'.
  612.  
  613. `.skip'
  614.      This is functionally identical to the `.space' directive.
  615.  
  616. `.word'
  617.      On the Sparc, the .word directive produces 32 bit values, instead
  618.      of the 16 bit values it produces on many other machines.
  619.  
  620. 
  621. File: as.info,  Node: i386-Dependent,  Prev: MIPS-Dependent,  Up: Machine Dependencies
  622.  
  623. 80386 Dependent Features
  624. ========================
  625.  
  626. * Menu:
  627.  
  628. * i386-Options::                Options
  629. * i386-Syntax::                 AT&T Syntax versus Intel Syntax
  630. * i386-Opcodes::                Opcode Naming
  631. * i386-Regs::                   Register Naming
  632. * i386-prefixes::               Opcode Prefixes
  633. * i386-Memory::                 Memory References
  634. * i386-jumps::                  Handling of Jump Instructions
  635. * i386-Float::                  Floating Point
  636. * i386-Notes::                  Notes
  637.  
  638. 
  639. File: as.info,  Node: i386-Options,  Next: i386-Syntax,  Up: i386-Dependent
  640.  
  641. Options
  642. -------
  643.  
  644.    The 80386 has no machine dependent options.
  645.  
  646. 
  647. File: as.info,  Node: i386-Syntax,  Next: i386-Opcodes,  Prev: i386-Options,  Up: i386-Dependent
  648.  
  649. AT&T Syntax versus Intel Syntax
  650. -------------------------------
  651.  
  652.    In order to maintain compatibility with the output of `gcc', `as'
  653. supports AT&T System V/386 assembler syntax.  This is quite different
  654. from Intel syntax.  We mention these differences because almost all
  655. 80386 documents used only Intel syntax.  Notable differences between
  656. the two syntaxes are:
  657.  
  658.    * AT&T immediate operands are preceded by `$'; Intel immediate
  659.      operands are undelimited (Intel `push 4' is AT&T `pushl $4').
  660.      AT&T register operands are preceded by `%'; Intel register operands
  661.      are undelimited.  AT&T absolute (as opposed to PC relative)
  662.      jump/call operands are prefixed by `*'; they are undelimited in
  663.      Intel syntax.
  664.  
  665.    * AT&T and Intel syntax use the opposite order for source and
  666.      destination operands.  Intel `add eax, 4' is `addl $4, %eax'.  The
  667.      `source, dest' convention is maintained for compatibility with
  668.      previous Unix assemblers.
  669.  
  670.    * In AT&T syntax the size of memory operands is determined from the
  671.      last character of the opcode name.  Opcode suffixes of `b', `w',
  672.      and `l' specify byte (8-bit), word (16-bit), and long (32-bit)
  673.      memory references.  Intel syntax accomplishes this by prefixes
  674.      memory operands (*not* the opcodes themselves) with `byte ptr',
  675.      `word ptr', and `dword ptr'.  Thus, Intel `mov al, byte ptr FOO'
  676.      is `movb FOO, %al' in AT&T syntax.
  677.  
  678.    * Immediate form long jumps and calls are `lcall/ljmp $SECTION,
  679.      $OFFSET' in AT&T syntax; the Intel syntax is `call/jmp far
  680.      SECTION:OFFSET'.  Also, the far return instruction is `lret
  681.      $STACK-ADJUST' in AT&T syntax; Intel syntax is `ret far
  682.      STACK-ADJUST'.
  683.  
  684.    * The AT&T assembler does not provide support for multiple section
  685.      programs.  Unix style systems expect all programs to be single
  686.      sections.
  687.  
  688. 
  689. File: as.info,  Node: i386-Opcodes,  Next: i386-Regs,  Prev: i386-Syntax,  Up: i386-Dependent
  690.  
  691. Opcode Naming
  692. -------------
  693.  
  694.    Opcode names are suffixed with one character modifiers which specify
  695. the size of operands.  The letters `b', `w', and `l' specify byte,
  696. word, and long operands.  If no suffix is specified by an instruction
  697. and it contains no memory operands then `as' tries to fill in the
  698. missing suffix based on the destination register operand (the last one
  699. by convention).  Thus, `mov %ax, %bx' is equivalent to `movw %ax, %bx';
  700. also, `mov $1, %bx' is equivalent to `movw $1, %bx'.  Note that this is
  701. incompatible with the AT&T Unix assembler which assumes that a missing
  702. opcode suffix implies long operand size.  (This incompatibility does
  703. not affect compiler output since compilers always explicitly specify
  704. the opcode suffix.)
  705.  
  706.    Almost all opcodes have the same names in AT&T and Intel format.
  707. There are a few exceptions.  The sign extend and zero extend
  708. instructions need two sizes to specify them.  They need a size to
  709. sign/zero extend *from* and a size to zero extend *to*.  This is
  710. accomplished by using two opcode suffixes in AT&T syntax.  Base names
  711. for sign extend and zero extend are `movs...' and `movz...' in AT&T
  712. syntax (`movsx' and `movzx' in Intel syntax).  The opcode suffixes are
  713. tacked on to this base name, the *from* suffix before the *to* suffix.
  714. Thus, `movsbl %al, %edx' is AT&T syntax for "move sign extend *from*
  715. %al *to* %edx."  Possible suffixes, thus, are `bl' (from byte to long),
  716. `bw' (from byte to word), and `wl' (from word to long).
  717.  
  718.    The Intel-syntax conversion instructions
  719.  
  720.    * `cbw' -- sign-extend byte in `%al' to word in `%ax',
  721.  
  722.    * `cwde' -- sign-extend word in `%ax' to long in `%eax',
  723.  
  724.    * `cwd' -- sign-extend word in `%ax' to long in `%dx:%ax',
  725.  
  726.    * `cdq' -- sign-extend dword in `%eax' to quad in `%edx:%eax',
  727.  
  728. are called `cbtw', `cwtl', `cwtd', and `cltd' in AT&T naming.  `as'
  729. accepts either naming for these instructions.
  730.  
  731.    Far call/jump instructions are `lcall' and `ljmp' in AT&T syntax,
  732. but are `call far' and `jump far' in Intel convention.
  733.  
  734. 
  735. File: as.info,  Node: i386-Regs,  Next: i386-prefixes,  Prev: i386-Opcodes,  Up: i386-Dependent
  736.  
  737. Register Naming
  738. ---------------
  739.  
  740.    Register operands are always prefixes with `%'.  The 80386 registers
  741. consist of
  742.  
  743.    * the 8 32-bit registers `%eax' (the accumulator), `%ebx', `%ecx',
  744.      `%edx', `%edi', `%esi', `%ebp' (the frame pointer), and `%esp'
  745.      (the stack pointer).
  746.  
  747.    * the 8 16-bit low-ends of these: `%ax', `%bx', `%cx', `%dx', `%di',
  748.      `%si', `%bp', and `%sp'.
  749.  
  750.    * the 8 8-bit registers: `%ah', `%al', `%bh', `%bl', `%ch', `%cl',
  751.      `%dh', and `%dl' (These are the high-bytes and low-bytes of `%ax',
  752.      `%bx', `%cx', and `%dx')
  753.  
  754.    * the 6 section registers `%cs' (code section), `%ds' (data
  755.      section), `%ss' (stack section), `%es', `%fs', and `%gs'.
  756.  
  757.    * the 3 processor control registers `%cr0', `%cr2', and `%cr3'.
  758.  
  759.    * the 6 debug registers `%db0', `%db1', `%db2', `%db3', `%db6', and
  760.      `%db7'.
  761.  
  762.    * the 2 test registers `%tr6' and `%tr7'.
  763.  
  764.    * the 8 floating point register stack `%st' or equivalently
  765.      `%st(0)', `%st(1)', `%st(2)', `%st(3)', `%st(4)', `%st(5)',
  766.      `%st(6)', and `%st(7)'.
  767.  
  768. 
  769. File: as.info,  Node: i386-prefixes,  Next: i386-Memory,  Prev: i386-Regs,  Up: i386-Dependent
  770.  
  771. Opcode Prefixes
  772. ---------------
  773.  
  774.    Opcode prefixes are used to modify the following opcode.  They are
  775. used to repeat string instructions, to provide section overrides, to
  776. perform bus lock operations, and to give operand and address size
  777. (16-bit operands are specified in an instruction by prefixing what would
  778. normally be 32-bit operands with a "operand size" opcode prefix).
  779. Opcode prefixes are usually given as single-line instructions with no
  780. operands, and must directly precede the instruction they act upon.  For
  781. example, the `scas' (scan string) instruction is repeated with:
  782.              repne
  783.              scas
  784.  
  785.    Here is a list of opcode prefixes:
  786.  
  787.    * Section override prefixes `cs', `ds', `ss', `es', `fs', `gs'.
  788.      These are automatically added by specifying using the
  789.      SECTION:MEMORY-OPERAND form for memory references.
  790.  
  791.    * Operand/Address size prefixes `data16' and `addr16' change 32-bit
  792.      operands/addresses into 16-bit operands/addresses.  Note that
  793.      16-bit addressing modes (i.e. 8086 and 80286 addressing modes) are
  794.      not supported (yet).
  795.  
  796.    * The bus lock prefix `lock' inhibits interrupts during execution of
  797.      the instruction it precedes.  (This is only valid with certain
  798.      instructions; see a 80386 manual for details).
  799.  
  800.    * The wait for coprocessor prefix `wait' waits for the coprocessor
  801.      to complete the current instruction.  This should never be needed
  802.      for the 80386/80387 combination.
  803.  
  804.    * The `rep', `repe', and `repne' prefixes are added to string
  805.      instructions to make them repeat `%ecx' times.
  806.  
  807. 
  808. File: as.info,  Node: i386-Memory,  Next: i386-jumps,  Prev: i386-prefixes,  Up: i386-Dependent
  809.  
  810. Memory References
  811. -----------------
  812.  
  813.    An Intel syntax indirect memory reference of the form
  814.  
  815.      SECTION:[BASE + INDEX*SCALE + DISP]
  816.  
  817. is translated into the AT&T syntax
  818.  
  819.      SECTION:DISP(BASE, INDEX, SCALE)
  820.  
  821. where BASE and INDEX are the optional 32-bit base and index registers,
  822. DISP is the optional displacement, and SCALE, taking the values 1, 2,
  823. 4, and 8, multiplies INDEX to calculate the address of the operand.  If
  824. no SCALE is specified, SCALE is taken to be 1.  SECTION specifies the
  825. optional section register for the memory operand, and may override the
  826. default section register (see a 80386 manual for section register
  827. defaults). Note that section overrides in AT&T syntax *must* have be
  828. preceded by a `%'.  If you specify a section override which coincides
  829. with the default section register, `as' does *not* output any section
  830. register override prefixes to assemble the given instruction.  Thus,
  831. section overrides can be specified to emphasize which section register
  832. is used for a given memory operand.
  833.  
  834.    Here are some examples of Intel and AT&T style memory references:
  835.  
  836. AT&T: `-4(%ebp)', Intel:  `[ebp - 4]'
  837.      BASE is `%ebp'; DISP is `-4'. SECTION is missing, and the default
  838.      section is used (`%ss' for addressing with `%ebp' as the base
  839.      register).  INDEX, SCALE are both missing.
  840.  
  841. AT&T: `foo(,%eax,4)', Intel: `[foo + eax*4]'
  842.      INDEX is `%eax' (scaled by a SCALE 4); DISP is `foo'.  All other
  843.      fields are missing.  The section register here defaults to `%ds'.
  844.  
  845. AT&T: `foo(,1)'; Intel `[foo]'
  846.      This uses the value pointed to by `foo' as a memory operand.  Note
  847.      that BASE and INDEX are both missing, but there is only *one* `,'.
  848.      This is a syntactic exception.
  849.  
  850. AT&T: `%gs:foo'; Intel `gs:foo'
  851.      This selects the contents of the variable `foo' with section
  852.      register SECTION being `%gs'.
  853.  
  854.    Absolute (as opposed to PC relative) call and jump operands must be
  855. prefixed with `*'.  If no `*' is specified, `as' always chooses PC
  856. relative addressing for jump/call labels.
  857.  
  858.    Any instruction that has a memory operand *must* specify its size
  859. (byte, word, or long) with an opcode suffix (`b', `w', or `l',
  860. respectively).
  861.  
  862. 
  863. File: as.info,  Node: i386-jumps,  Next: i386-Float,  Prev: i386-Memory,  Up: i386-Dependent
  864.  
  865. Handling of Jump Instructions
  866. -----------------------------
  867.  
  868.    Jump instructions are always optimized to use the smallest possible
  869. displacements.  This is accomplished by using byte (8-bit) displacement
  870. jumps whenever the target is sufficiently close.  If a byte displacement
  871. is insufficient a long (32-bit) displacement is used.  We do not support
  872. word (16-bit) displacement jumps (i.e. prefixing the jump instruction
  873. with the `addr16' opcode prefix), since the 80386 insists upon masking
  874. `%eip' to 16 bits after the word displacement is added.
  875.  
  876.    Note that the `jcxz', `jecxz', `loop', `loopz', `loope', `loopnz'
  877. and `loopne' instructions only come in byte displacements, so that if
  878. you use these instructions (`gcc' does not use them) you may get an
  879. error message (and incorrect code).  The AT&T 80386 assembler tries to
  880. get around this problem by expanding `jcxz foo' to
  881.  
  882.               jcxz cx_zero
  883.               jmp cx_nonzero
  884.      cx_zero: jmp foo
  885.      cx_nonzero:
  886.  
  887. 
  888. File: as.info,  Node: i386-Float,  Next: i386-Notes,  Prev: i386-jumps,  Up: i386-Dependent
  889.  
  890. Floating Point
  891. --------------
  892.  
  893.    All 80387 floating point types except packed BCD are supported.
  894. (BCD support may be added without much difficulty).  These data types
  895. are 16-, 32-, and 64- bit integers, and single (32-bit), double
  896. (64-bit), and extended (80-bit) precision floating point.  Each
  897. supported type has an opcode suffix and a constructor associated with
  898. it.  Opcode suffixes specify operand's data types.  Constructors build
  899. these data types into memory.
  900.  
  901.    * Floating point constructors are `.float' or `.single', `.double',
  902.      and `.tfloat' for 32-, 64-, and 80-bit formats.  These correspond
  903.      to opcode suffixes `s', `l', and `t'.  `t' stands for temporary
  904.      real, and that the 80387 only supports this format via the `fldt'
  905.      (load temporary real to stack top) and `fstpt' (store temporary
  906.      real and pop stack) instructions.
  907.  
  908.    * Integer constructors are `.word', `.long' or `.int', and `.quad'
  909.      for the 16-, 32-, and 64-bit integer formats.  The corresponding
  910.      opcode suffixes are `s' (single), `l' (long), and `q' (quad).  As
  911.      with the temporary real format the 64-bit `q' format is only
  912.      present in the `fildq' (load quad integer to stack top) and
  913.      `fistpq' (store quad integer and pop stack) instructions.
  914.  
  915.    Register to register operations do not require opcode suffixes, so
  916. that `fst %st, %st(1)' is equivalent to `fstl %st, %st(1)'.
  917.  
  918.    Since the 80387 automatically synchronizes with the 80386 `fwait'
  919. instructions are almost never needed (this is not the case for the
  920. 80286/80287 and 8086/8087 combinations).  Therefore, `as' suppresses
  921. the `fwait' instruction whenever it is implicitly selected by one of
  922. the `fn...' instructions.  For example, `fsave' and `fnsave' are
  923. treated identically.  In general, all the `fn...' instructions are made
  924. equivalent to `f...' instructions.  If `fwait' is desired it must be
  925. explicitly coded.
  926.  
  927. 
  928. File: as.info,  Node: i386-Notes,  Prev: i386-Float,  Up: i386-Dependent
  929.  
  930. Notes
  931. -----
  932.  
  933.    There is some trickery concerning the `mul' and `imul' instructions
  934. that deserves mention.  The 16-, 32-, and 64-bit expanding multiplies
  935. (base opcode `0xf6'; extension 4 for `mul' and 5 for `imul') can be
  936. output only in the one operand form.  Thus, `imul %ebx, %eax' does
  937. *not* select the expanding multiply; the expanding multiply would
  938. clobber the `%edx' register, and this would confuse `gcc' output.  Use
  939. `imul %ebx' to get the 64-bit product in `%edx:%eax'.
  940.  
  941.    We have added a two operand form of `imul' when the first operand is
  942. an immediate mode expression and the second operand is a register.
  943. This is just a shorthand, so that, multiplying `%eax' by 69, for
  944. example, can be done with `imul $69, %eax' rather than `imul $69, %eax,
  945. %eax'.
  946.  
  947. 
  948. File: as.info,  Node: Z8000-Dependent,  Next: MIPS-Dependent,  Prev: Sparc-Dependent,  Up: Machine Dependencies
  949.  
  950. Z8000 Dependent Features
  951. ========================
  952.  
  953.    The Z8000 as supports both members of the Z8000 family: the
  954. unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with
  955. 24 bit addresses.
  956.  
  957.    When the assembler is in unsegmented mode (specified with the
  958. `unsegm' directive), an address takes up one word (16 bit) sized
  959. register.  When the assembler is in segmented mode (specified with the
  960. `segm' directive), a 24-bit address takes up a long (32 bit) register.
  961. *Note Assembler Directives for the Z8000: Z8000 Directives, for a list
  962. of other Z8000 specific assembler directives.
  963.  
  964. * Menu:
  965.  
  966. * Z8000 Options::               No special command-line options for Z8000
  967. * Z8000 Syntax::                Assembler syntax for the Z8000
  968. * Z8000 Directives::            Special directives for the Z8000
  969. * Z8000 Opcodes::               Opcodes
  970.  
  971. 
  972. File: as.info,  Node: Z8000 Options,  Next: Z8000 Syntax,  Up: Z8000-Dependent
  973.  
  974. Options
  975. -------
  976.  
  977.    `as' has no additional command-line options for the Zilog Z8000
  978. family.
  979.  
  980. 
  981. File: as.info,  Node: Z8000 Syntax,  Next: Z8000 Directives,  Prev: Z8000 Options,  Up: Z8000-Dependent
  982.  
  983. Syntax
  984. ------
  985.  
  986. * Menu:
  987.  
  988. * Z8000-Chars::                Special Characters
  989. * Z8000-Regs::                 Register Names
  990. * Z8000-Addressing::           Addressing Modes
  991.  
  992. 
  993. File: as.info,  Node: Z8000-Chars,  Next: Z8000-Regs,  Up: Z8000 Syntax
  994.  
  995. Special Characters
  996. ..................
  997.  
  998.    `!' is the line comment character.
  999.  
  1000.    You can use `;' instead of a newline to separate statements.
  1001.  
  1002. 
  1003. File: as.info,  Node: Z8000-Regs,  Next: Z8000-Addressing,  Prev: Z8000-Chars,  Up: Z8000 Syntax
  1004.  
  1005. Register Names
  1006. ..............
  1007.  
  1008.    The Z8000 has sixteen 16 bit registers, numbered 0 to 15.  You can
  1009. refer to different sized groups of registers by register number, with
  1010. the prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq'
  1011. for 64 bit registers.  You can also refer to the contents of the first
  1012. eight (of the sixteen 16 bit registers) by bytes.  They are named `rNh'
  1013. and `rNl'.
  1014.  
  1015. *byte registers*
  1016.      r0l r0h r1h r1l r2h r2l r3h r3l
  1017.      r4h r4l r5h r5l r6h r6l r7h r7l
  1018. *word registers*
  1019.      r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
  1020. *long word registers*
  1021.      rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14
  1022. *quad word registers*
  1023.      rq0 rq4 rq8 rq12
  1024.  
  1025. 
  1026. File: as.info,  Node: Z8000-Addressing,  Prev: Z8000-Regs,  Up: Z8000 Syntax
  1027.  
  1028. Addressing Modes
  1029. ................
  1030.  
  1031.    as understands the following addressing modes for the Z8000:
  1032.  
  1033. `rN'
  1034.      Register direct
  1035.  
  1036. `@rN'
  1037.      Indirect register
  1038.  
  1039. `ADDR'
  1040.      Direct: the 16 bit or 24 bit address (depending on whether the
  1041.      assembler is in segmented or unsegmented mode) of the operand is
  1042.      in the instruction.
  1043.  
  1044. `address(rN)'
  1045.      Indexed: the 16 or 24 bit address is added to the 16 bit register
  1046.      to produce the final address in memory of the operand.
  1047.  
  1048. `rN(#IMM)'
  1049.      Base Address: the 16 or 24 bit register is added to the 16 bit sign
  1050.      extended immediate displacement to produce the final address in
  1051.      memory of the operand.
  1052.  
  1053. `rN(rM)'
  1054.      Base Index: the 16 or 24 bit register rN is added to the sign
  1055.      extended 16 bit index register rM to produce the final address in
  1056.      memory of the operand.
  1057.  
  1058. `#XX'
  1059.      Immediate data XX.
  1060.  
  1061. 
  1062. File: as.info,  Node: Z8000 Directives,  Next: Z8000 Opcodes,  Prev: Z8000 Syntax,  Up: Z8000-Dependent
  1063.  
  1064. Assembler Directives for the Z8000
  1065. ----------------------------------
  1066.  
  1067.    The Z8000 port of as includes these additional assembler directives,
  1068. for compatibility with other Z8000 assemblers.  As shown, these do not
  1069. begin with `.' (unlike the ordinary as directives).
  1070.  
  1071. `segm'
  1072.      Generates code for the segmented Z8001.
  1073.  
  1074. `unsegm'
  1075.      Generates code for the unsegmented Z8002.
  1076.  
  1077. `name'
  1078.      Synonym for `.file'
  1079.  
  1080. `global'
  1081.      Synonum for `.global'
  1082.  
  1083. `wval'
  1084.      Synonym for `.word'
  1085.  
  1086. `lval'
  1087.      Synonym for `.long'
  1088.  
  1089. `bval'
  1090.      Synonym for `.byte'
  1091.  
  1092. `sval'
  1093.      Assemble a string.  `sval' expects one string literal, delimited by
  1094.      single quotes.  It assembles each byte of the string into
  1095.      consecutive addresses.  You can use the escape sequence `%XX'
  1096.      (where XX represents a two-digit hexadecimal number) to represent
  1097.      the character whose ASCII value is XX.  Use this feature to
  1098.      describe single quote and other characters that may not appear in
  1099.      string literals as themselves.  For example, the C statement
  1100.      `char *a = "he said \"it's 50% off\"";' is represented in Z8000
  1101.      assembly language (shown with the assembler output in hex at the
  1102.      left) as
  1103.  
  1104.           68652073    sval    'he said %22it%27s 50%25 off%22%00'
  1105.           61696420
  1106.           22697427
  1107.           73203530
  1108.           25206F66
  1109.           662200
  1110.  
  1111. `rsect'
  1112.      synonym for `.section'
  1113.  
  1114. `block'
  1115.      synonym for `.space'
  1116.  
  1117. `even'
  1118.      synonym for `.align 1'
  1119.  
  1120. 
  1121. File: as.info,  Node: Z8000 Opcodes,  Prev: Z8000 Directives,  Up: Z8000-Dependent
  1122.  
  1123. Opcodes
  1124. -------
  1125.  
  1126.    For detailed information on the Z8000 machine instruction set, see
  1127. `Z8000 Technical Manual'.
  1128.  
  1129.    The following table summarizes the opcodes and their arguments:
  1130.  
  1131.                  rs   16 bit source register
  1132.                  rd   16 bit destination register
  1133.                  rbs   8 bit source register
  1134.                  rbd   8 bit destination register
  1135.                  rrs   32 bit source register
  1136.                  rrd   32 bit destination register
  1137.                  rqs   64 bit source register
  1138.                  rqd   64 bit destination register
  1139.                  addr 16/24 bit address
  1140.                  imm  immediate data
  1141.      
  1142.      adc rd,rs               clrb addr               cpsir @rd,@rs,rr,cc
  1143.      adcb rbd,rbs            clrb addr(rd)           cpsirb @rd,@rs,rr,cc
  1144.      add rd,@rs              clrb rbd                dab rbd
  1145.      add rd,addr             com @rd                 dbjnz rbd,disp7
  1146.      add rd,addr(rs)         com addr                dec @rd,imm4m1
  1147.      add rd,imm16            com addr(rd)            dec addr(rd),imm4m1
  1148.      add rd,rs               com rd                  dec addr,imm4m1
  1149.      addb rbd,@rs            comb @rd                dec rd,imm4m1
  1150.      addb rbd,addr           comb addr               decb @rd,imm4m1
  1151.      addb rbd,addr(rs)       comb addr(rd)           decb addr(rd),imm4m1
  1152.      addb rbd,imm8           comb rbd                decb addr,imm4m1
  1153.      addb rbd,rbs            comflg flags            decb rbd,imm4m1
  1154.      addl rrd,@rs            cp @rd,imm16            di i2
  1155.      addl rrd,addr           cp addr(rd),imm16       div rrd,@rs
  1156.      addl rrd,addr(rs)       cp addr,imm16           div rrd,addr
  1157.      addl rrd,imm32          cp rd,@rs               div rrd,addr(rs)
  1158.      addl rrd,rrs            cp rd,addr              div rrd,imm16
  1159.      and rd,@rs              cp rd,addr(rs)          div rrd,rs
  1160.      and rd,addr             cp rd,imm16             divl rqd,@rs
  1161.      and rd,addr(rs)         cp rd,rs                divl rqd,addr
  1162.      and rd,imm16            cpb @rd,imm8            divl rqd,addr(rs)
  1163.      and rd,rs               cpb addr(rd),imm8       divl rqd,imm32
  1164.      andb rbd,@rs            cpb addr,imm8           divl rqd,rrs
  1165.      andb rbd,addr           cpb rbd,@rs             djnz rd,disp7
  1166.      andb rbd,addr(rs)       cpb rbd,addr            ei i2
  1167.      andb rbd,imm8           cpb rbd,addr(rs)        ex rd,@rs
  1168.      andb rbd,rbs            cpb rbd,imm8            ex rd,addr
  1169.      bit @rd,imm4            cpb rbd,rbs             ex rd,addr(rs)
  1170.      bit addr(rd),imm4       cpd rd,@rs,rr,cc        ex rd,rs
  1171.      bit addr,imm4           cpdb rbd,@rs,rr,cc      exb rbd,@rs
  1172.      bit rd,imm4             cpdr rd,@rs,rr,cc       exb rbd,addr
  1173.      bit rd,rs               cpdrb rbd,@rs,rr,cc     exb rbd,addr(rs)
  1174.      bitb @rd,imm4           cpi rd,@rs,rr,cc        exb rbd,rbs
  1175.      bitb addr(rd),imm4      cpib rbd,@rs,rr,cc      ext0e imm8
  1176.      bitb addr,imm4          cpir rd,@rs,rr,cc       ext0f imm8
  1177.      bitb rbd,imm4           cpirb rbd,@rs,rr,cc     ext8e imm8
  1178.      bitb rbd,rs             cpl rrd,@rs             ext8f imm8
  1179.      bpt                     cpl rrd,addr            exts rrd
  1180.      call @rd                cpl rrd,addr(rs)        extsb rd
  1181.      call addr               cpl rrd,imm32           extsl rqd
  1182.      call addr(rd)           cpl rrd,rrs             halt
  1183.      calr disp12             cpsd @rd,@rs,rr,cc      in rd,@rs
  1184.      clr @rd                 cpsdb @rd,@rs,rr,cc     in rd,imm16
  1185.      clr addr                cpsdr @rd,@rs,rr,cc     inb rbd,@rs
  1186.      clr addr(rd)            cpsdrb @rd,@rs,rr,cc    inb rbd,imm16
  1187.      clr rd                  cpsi @rd,@rs,rr,cc      inc @rd,imm4m1
  1188.      clrb @rd                cpsib @rd,@rs,rr,cc     inc addr(rd),imm4m1
  1189.      inc addr,imm4m1         ldb rbd,rs(rx)          mult rrd,addr(rs)
  1190.      inc rd,imm4m1           ldb rd(imm16),rbs       mult rrd,imm16
  1191.      incb @rd,imm4m1         ldb rd(rx),rbs          mult rrd,rs
  1192.      incb addr(rd),imm4m1    ldctl ctrl,rs           multl rqd,@rs
  1193.      incb addr,imm4m1        ldctl rd,ctrl           multl rqd,addr
  1194.      incb rbd,imm4m1         ldd @rs,@rd,rr          multl rqd,addr(rs)
  1195.      ind @rd,@rs,ra          lddb @rs,@rd,rr         multl rqd,imm32
  1196.      indb @rd,@rs,rba        lddr @rs,@rd,rr         multl rqd,rrs
  1197.      inib @rd,@rs,ra         lddrb @rs,@rd,rr        neg @rd
  1198.      inibr @rd,@rs,ra        ldi @rd,@rs,rr          neg addr
  1199.      iret                    ldib @rd,@rs,rr         neg addr(rd)
  1200.      jp cc,@rd               ldir @rd,@rs,rr         neg rd
  1201.      jp cc,addr              ldirb @rd,@rs,rr        negb @rd
  1202.      jp cc,addr(rd)          ldk rd,imm4             negb addr
  1203.      jr cc,disp8             ldl @rd,rrs             negb addr(rd)
  1204.      ld @rd,imm16            ldl addr(rd),rrs        negb rbd
  1205.      ld @rd,rs               ldl addr,rrs            nop
  1206.      ld addr(rd),imm16       ldl rd(imm16),rrs       or rd,@rs
  1207.      ld addr(rd),rs          ldl rd(rx),rrs          or rd,addr
  1208.      ld addr,imm16           ldl rrd,@rs             or rd,addr(rs)
  1209.      ld addr,rs              ldl rrd,addr            or rd,imm16
  1210.      ld rd(imm16),rs         ldl rrd,addr(rs)        or rd,rs
  1211.      ld rd(rx),rs            ldl rrd,imm32           orb rbd,@rs
  1212.      ld rd,@rs               ldl rrd,rrs             orb rbd,addr
  1213.      ld rd,addr              ldl rrd,rs(imm16)       orb rbd,addr(rs)
  1214.      ld rd,addr(rs)          ldl rrd,rs(rx)          orb rbd,imm8
  1215.      ld rd,imm16             ldm @rd,rs,n            orb rbd,rbs
  1216.      ld rd,rs                ldm addr(rd),rs,n       out @rd,rs
  1217.      ld rd,rs(imm16)         ldm addr,rs,n           out imm16,rs
  1218.      ld rd,rs(rx)            ldm rd,@rs,n            outb @rd,rbs
  1219.      lda rd,addr             ldm rd,addr(rs),n       outb imm16,rbs
  1220.      lda rd,addr(rs)         ldm rd,addr,n           outd @rd,@rs,ra
  1221.      lda rd,rs(imm16)        ldps @rs                outdb @rd,@rs,rba
  1222.      lda rd,rs(rx)           ldps addr               outib @rd,@rs,ra
  1223.      ldar rd,disp16          ldps addr(rs)           outibr @rd,@rs,ra
  1224.      ldb @rd,imm8            ldr disp16,rs           pop @rd,@rs
  1225.      ldb @rd,rbs             ldr rd,disp16           pop addr(rd),@rs
  1226.      ldb addr(rd),imm8       ldrb disp16,rbs         pop addr,@rs
  1227.      ldb addr(rd),rbs        ldrb rbd,disp16         pop rd,@rs
  1228.      ldb addr,imm8           ldrl disp16,rrs         popl @rd,@rs
  1229.      ldb addr,rbs            ldrl rrd,disp16         popl addr(rd),@rs
  1230.      ldb rbd,@rs             mbit                    popl addr,@rs
  1231.      ldb rbd,addr            mreq rd                 popl rrd,@rs
  1232.      ldb rbd,addr(rs)        mres                    push @rd,@rs
  1233.      ldb rbd,imm8            mset                    push @rd,addr
  1234.      ldb rbd,rbs             mult rrd,@rs            push @rd,addr(rs)
  1235.      ldb rbd,rs(imm16)       mult rrd,addr           push @rd,imm16
  1236.      push @rd,rs             set addr,imm4           subl rrd,imm32
  1237.      pushl @rd,@rs           set rd,imm4             subl rrd,rrs
  1238.      pushl @rd,addr          set rd,rs               tcc cc,rd
  1239.      pushl @rd,addr(rs)      setb @rd,imm4           tccb cc,rbd
  1240.      pushl @rd,rrs           setb addr(rd),imm4      test @rd
  1241.      res @rd,imm4            setb addr,imm4          test addr
  1242.      res addr(rd),imm4       setb rbd,imm4           test addr(rd)
  1243.      res addr,imm4           setb rbd,rs             test rd
  1244.      res rd,imm4             setflg imm4             testb @rd
  1245.      res rd,rs               sinb rbd,imm16          testb addr
  1246.      resb @rd,imm4           sinb rd,imm16           testb addr(rd)
  1247.      resb addr(rd),imm4      sind @rd,@rs,ra         testb rbd
  1248.      resb addr,imm4          sindb @rd,@rs,rba       testl @rd
  1249.      resb rbd,imm4           sinib @rd,@rs,ra        testl addr
  1250.      resb rbd,rs             sinibr @rd,@rs,ra       testl addr(rd)
  1251.      resflg imm4             sla rd,imm8             testl rrd
  1252.      ret cc                  slab rbd,imm8           trdb @rd,@rs,rba
  1253.      rl rd,imm1or2           slal rrd,imm8           trdrb @rd,@rs,rba
  1254.      rlb rbd,imm1or2         sll rd,imm8             trib @rd,@rs,rbr
  1255.      rlc rd,imm1or2          sllb rbd,imm8           trirb @rd,@rs,rbr
  1256.      rlcb rbd,imm1or2        slll rrd,imm8           trtdrb @ra,@rb,rbr
  1257.      rldb rbb,rba            sout imm16,rs           trtib @ra,@rb,rr
  1258.      rr rd,imm1or2           soutb imm16,rbs         trtirb @ra,@rb,rbr
  1259.      rrb rbd,imm1or2         soutd @rd,@rs,ra        trtrb @ra,@rb,rbr
  1260.      rrc rd,imm1or2          soutdb @rd,@rs,rba      tset @rd
  1261.      rrcb rbd,imm1or2        soutib @rd,@rs,ra       tset addr
  1262.      rrdb rbb,rba            soutibr @rd,@rs,ra      tset addr(rd)
  1263.      rsvd36                  sra rd,imm8             tset rd
  1264.      rsvd38                  srab rbd,imm8           tsetb @rd
  1265.      rsvd78                  sral rrd,imm8           tsetb addr
  1266.      rsvd7e                  srl rd,imm8             tsetb addr(rd)
  1267.      rsvd9d                  srlb rbd,imm8           tsetb rbd
  1268.      rsvd9f                  srll rrd,imm8           xor rd,@rs
  1269.      rsvdb9                  sub rd,@rs              xor rd,addr
  1270.      rsvdbf                  sub rd,addr             xor rd,addr(rs)
  1271.      sbc rd,rs               sub rd,addr(rs)         xor rd,imm16
  1272.      sbcb rbd,rbs            sub rd,imm16            xor rd,rs
  1273.      sc imm8                 sub rd,rs               xorb rbd,@rs
  1274.      sda rd,rs               subb rbd,@rs            xorb rbd,addr
  1275.      sdab rbd,rs             subb rbd,addr           xorb rbd,addr(rs)
  1276.      sdal rrd,rs             subb rbd,addr(rs)       xorb rbd,imm8
  1277.      sdl rd,rs               subb rbd,imm8           xorb rbd,rbs
  1278.      sdlb rbd,rs             subb rbd,rbs            xorb rbd,rbs
  1279.      sdll rrd,rs             subl rrd,@rs
  1280.      set @rd,imm4            subl rrd,addr
  1281.      set addr(rd),imm4       subl rrd,addr(rs)
  1282.  
  1283.